#!/usr/bin/env bash

# expected results: CREATE: 0 SELECT: 1 SELECT: 0 SELECT: 0 SELECT: 1 SELECT: 1
set 0 1 0 0 1 1

grep "SELECT" $PGPOOLLOG | grep -v version |awk '{print $9}' | while read node
do
    if [ $1 -ne $node ]
    then
	echo "expected: $1 result: $node"
	exit 99
    fi
    shift
done

if [ $? = 99 ]
then
   exit 1
fi

exit 0

